package com.example.home.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.home.R
import com.example.home.entity.HomeListEntityItem

class HomeAdapter : BaseQuickAdapter<HomeListEntityItem,BaseViewHolder>(R.layout.item_home){
    override fun convert(holder: BaseViewHolder, item: HomeListEntityItem) {
        val title=holder.getView<TextView>(R.id.tv_title)
        val content=holder.getView<TextView>(R.id.tv_content)
        val time=holder.getView<TextView>(R.id.tv_time)
        title.text=item.title
        content.text=item.content
        time.text=item.publishTime
    }

}